import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';
import get_param from '@dfeidao/atom-mobile/nav/get-param';
import render from '@dfeidao/atom-mobile/render/render';
import whoami from '../atom/whoami_getparams';
export default async function a001(fd: IFeidaoAiMobile, e: Event) {
	const teacher_leave_num = await get_param(fd, 'teacher_leave_num');
	const users = await whoami(fd) as { userinfo: { productid: string; } };
	const userinfo = users.userinfo;
	const productid = userinfo.productid;

	const res = await nodejs<{ data: Array<{}> }>('app-leave-details/s001', { productid, teacher_leave_num });
	render(fd, { data: res.data });
}
